<template>
  <div class="edit box">
    <div>
      <p>
        &#12288;&#12288;&#12288;业务名称
        <el-input v-model="name" :disabled="true" size="normal"></el-input>
      </p>
      <p>
        &#12288;&#12288;&#12288;系统名称
        <el-input v-model="sysName" :disabled="true" size="normal"></el-input>
      </p>
      <p>
        &#12288;&#12288;&#12288;传输配置
        <el-input v-model="transmissionName" :disabled="true" size="normal"></el-input>
      </p>
      <p>
        &#12288;&#12288;&#12288;创建时间
        <el-input v-model="createDate" :disabled="true" size="normal"></el-input>
      </p>
      <p>
        &#12288;&#12288;&#12288;修改时间
        <el-input v-model="updateDate" :disabled="true" size="normal"></el-input>
      </p>
      <p>
        &#12288;&#12288;&#12288;&#12288;&#12288;状态
        <span class="fixWidth">
           <el-radio disabled v-model="status" label="start" v-if="status === 'start'" class="start">启用</el-radio>
          <el-radio disabled v-model="status" label="stop" v-if="status === 'stop'">禁用</el-radio>
        </span>
      </p>
      <p>
        &#12288;&#12288;&#12288;&#12288;&#12288;备注
        <el-input
            size="normal"
            :disabled="true"
            type="textarea"
            :autosize="{ minRows: 2, maxRows: 4}"
            placeholder="请输入内容"
            v-model="remarks"
            resize="none">
        </el-input>
      </p>
      <p>
        <el-button type="primary" round size="normal" @click="()=>{$router.push('/configManage/businessManage')}">返回</el-button>
      </p>
    </div>

  </div>
</template>

<script>
export default {
  name: "businessView",
  components:{},
  data(){
    return{
      name:'',
      transmissionName:'',
      sysName:'',
      createDate:'',
      createBy:'',
      updateDate:'',
      updateBy:'',
      status:'',
      remarks:''
    }
  },
  created(){
    this.getBusiness();
  },
  methods:{
    getBusiness(){
      this.$Http.businessView({
        id:this.$route.query.id
      }).then((res)=> {
        if (res.code === "SUCCESS") {
          console.log(res);
          this.name = res.data.name;
          this.transmissionName = res.data.transmissionName;
          this.sysName = res.data.sysName;
          this.createBy = res.data.createBy;
          this.createDate = res.data.createDate;
          this.updateDate = res.data.updateDate;
          this.updateBy = res.data.updateBy;
          this.status = res.data.status;
          this.remarks = res.data.remarks;
        }
        else {
          this.$message.error("操作错误，请重新操作")
        }
      })
    }
  }
}
</script>

<style scoped lang="scss">
@import "src/assets/css/content.scss";

//页面完善
.box p:last-child{
  margin-bottom: -12px;
	margin-top: 0px!important;
}
</style>
